<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="it">
<head>
	<meta content="text/html; charset=UTF-8" http-equiv="content-type">
	<title>Retwis - Example Twitter clone based on the Redis Key-Value DB</title>
	<link href="../css/style.css" rel="stylesheet" type="text/css"></head>
<body>
	<div id="page">
		<div id="header">
			<a href="/index/user">
				<img style="border:none" src="../logo.png" width="192" height="85" alt="Retwis"></a>
			<div id="navbar">
				<a href="/">主页</a>
				<?php
					if(!isset($_SESSION['username'])){
						echo '<a href="/register">注册</a>|<a href="/login">登录</a>';
					}else{
						echo " <a href='#'>".$_SESSION['username'] ."</a> ";
						echo '|<a href="/logout">退出</a>';
					}
				?>
			</div>
		</div>
		<div id="postform">
			<form method="POST" action="/post">
				有啥感想?
				<br>
				<table>
					<tr>
						<td>
							<textarea cols="98" rows="4" name="status"></textarea>
						</td>
					</tr>
					<tr>
						<td align="right">
							<input type="submit" value="发布"></td>
					</tr>
				</table>
			</form>
		</div>
		<div id="welcomebox">
			{volist name="list" id="vo"}
				<div class="post" style="min-height:70px;">
					<div style="width:10%;float:left;">
						<img src="http://t1.qlogo.cn/mbloghead/f534bf85d6d5d4c1f2fe/50" title=""></div>
					<div style="float:right;width:90%;">
						<a class="username" href="/profile?u={$vo.user_id}">{$vo.username}</a>
						<i>{:date('Y-m-d H:i:s',$vo['starttime'])}</i>
						<p>
							{$vo.content}
						</p>
					</div>
				</div>
			{/volist}
		</div>
</body>
	</html>
